package com.nightsoul.springboot.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.nightsoul.springboot.test.entity.User;

@RestController
@RequestMapping("/user")
@EnableAutoConfiguration
public class UserController {
	
	
	@RequestMapping("/{id}")  
    public User view(@PathVariable("id") Integer id) {  
        User user = new User(id, "zhangsan", "xtayfjpk");  
        return user;  
    } 
	
	public static void main(String[] args) {
		SpringApplication.run(UserController.class);
	}
}
